home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
apidev
/
creatf.arc
/
FILES.ASM
next >
Wrap
Assembly Source File
|
1987-12-15
|
719b
|
45 lines
name Create_A_File
CGroup group Code
assume cs: CGroup, ds: CGroup
Code segment 'CODE'
jmp Main
File db 'TEST.TXT',0
HandleMsg db 'Handle is: $'
LineFeed db 0Ah, 0Dh,'$'
Main proc near
mov ax, cs
mov ds, ax
;DOS requires 3Ch in AH for create and attribute in CX
; 80h is shareable read/write
mov dx, offset CGroup: File
mov ax, 3C00h
mov cx, 0080h
int 21h
push ax
;Print out the file handle
mov dx, offset CGroup: HandleMsg
mov ah, 09h
int 21h
pop ax
xor ah, ah
mov dl, al
add dl, 48
mov ah, 02h
int 21h
mov dx, offset CGroup: LineFeed
mov ah, 09h
int 21h
;Terminate this DOS process
mov ax, 4C01h
int 21h
ret
Main endp
Code ends
end